package data;

import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.util.LinkedList;
import java.util.List;

public class GeneDataFile {

	private List<Gene> genes;
	
	public GeneDataFile(File dataFile) throws Exception{
		genes = new LinkedList<Gene>();
		
		BufferedReader reader;
		reader = new BufferedReader(new FileReader(dataFile));
		for (String data = reader.readLine(); data!=null;data = reader.readLine() ) {
			Gene gene = new Gene(data);
			genes.add(gene);
		}
	}
	
	public Gene[] genes(){
		Gene[] array = {};
		return genes.toArray(array);
	}

}
